<template>
  <el-row>
    <el-row :gutter="20" class="panel-group">
      <el-col :xs="24" :sm="12" :lg="6" class="card-panel-col">
        <div class="card-panel" @click="highway_inbound" style="background: #407AFF;">
          <div class="card-panel-icon-wrapper icon-huoyuan " >
            <svg-icon icon-class="gongluin" class-name="card-panel-icon" />
          </div>
          <div class="card-panel-description">
            <div class="card-panel-text">收货单新增</div>
            <div class="card-panel-en">ADD RECEIPT</div>
          </div>
        </div>
      </el-col>
      <el-col :xs="24" :sm="12" :lg="6" class="card-panel-col">
        <div class="card-panel" @click="highway_outbound" style="background: #FF8B00;">
          <div class="card-panel-icon-wrapper icon-dingdanguanli">
            <svg-icon icon-class="newhuoyuan" class-name="card-panel-icon" />
          </div>
          <div class="card-panel-description">
            <div class="card-panel-text">退货单新增</div>
            <div class="card-panel-en">ADD RETURN ORDER</div>
          </div>
        </div>
      </el-col>
      <el-col :xs="24" :sm="12" :lg="6" class="card-panel-col">
        <div class="card-panel" @click="railway_inbound" style="background: #25C4A4;">
          <div class="card-panel-icon-wrapper icon-kefu">
            <svg-icon icon-class="tielu" class-name="card-panel-icon"/>
          </div>
          <div class="card-panel-description">
            <div class="card-panel-text">发货单新增</div>
            <div class="card-panel-en">ADD SHIPMENT ORDER</div>
          </div>
        </div>
      </el-col>
      <el-col :xs="24" :sm="12" :lg="6" class="card-panel-col">
        <div class="card-panel" @click="railway_outbound" style="background: #FF604D;">
          <div class="card-panel-icon-wrapper icon-dashuju">
            <svg-icon icon-class="tieluout" class-name="card-panel-icon"/>
          </div>
          <div class="card-panel-description">
            <div class="card-panel-text">盘点单新增</div>
            <div class="card-panel-en">ADD INVENTORY LIST</div>
          </div>
        </div>
      </el-col>
    </el-row>
  </el-row>

</template>

<script>
  import CountTo from 'vue-count-to'

  export default {
    components: {
      CountTo
    },
    methods: {
      handleSetLineChartData(type) {
        this.$emit('handleSetLineChartData', type)
      },
      // 公路预约出库
      highway_outbound() {
        this.$router.push({
          path: '/inbound/returnAdd'
        })
      },
      // 公路预约入库
      highway_inbound() {
        this.$router.push({
          path: '/inbound/reciveAdd'
        })
      },
      // 铁路预约入库
      railway_inbound() {
        this.$router.push({
          path: '/wms/deliveryAdd'
        })
      },
      // 铁路预约出库
      railway_outbound() {
        this.$router.push({
          path: '/kngl/countingAdd'
        })
      }
    }
  }
</script>

<style lang="scss" scoped>
  .panel-group {
    .card-panel {
      padding: 0 8px 0 8px;
      box-sizing: border-box;
      height: 130px;
      cursor: pointer;
      font-size: 18px;
      position: relative;
      overflow: hidden;
      color:  #fff;
      border-radius: 4px;
      border-color: rgba(0, 0, 0, 0.05);
      .card-panel-description {
        margin-top: 40px;
        margin-left: 3px;
        // float: left;
        text-align: left;
        .card-panel-en {
          font-size: 0.2em;
          margin-top: 5px;
        }

        .card-panel-text {
          margin-top: 17px;
          font-size: 0.9em;
          line-height: 18px;
          color:  #fff;
          // font-weight: 600;
        }

        .card-panel-num {
          font-size: 20px;
        }
      }
    }

    .card-panel:hover {
      box-shadow: 4px 4px 40px rgba(0, 0, 0, 0.05);
    }
  }

  @media (max-width: 550px) {
    .card-panel-description {
      display: none;
    }

    .card-panel-icon-wrapper {
      float: none !important;
      width: 100%;
      height: 100%;
      margin: 0 !important;

      .svg-icon {
        display: block;
        width: 200%;
        margin: 14px auto !important;
        float: none !important;
      }
    }
  }

  .card-panel-icon-wrapper {
    float: left;
    margin-top: 10px;
    padding: 16px;
    transition: all 0.38s ease-out;
    border-radius: 10px;

  }
  .card-panel-icon {
    float: left;
    font-size: 74px;

  }
</style>
